ODIR = ../../naimath/web/templates

CHEETAH = cheetah
CHEETAH_FLAGS = --odir=$(ODIR) --flat --nobackup

INCLS = base_start.txt base_end.txt

#TEXTS = $(wildcard *.txt)
SOURCES = $(wildcard *.tmpl)
PYS = ${SOURCES:%.tmpl=$(ODIR)/%.py}
#TXTS = ${TEXTS:%.txt=$(ODIR)/%.txt}

$(ODIR)/%.py: %.tmpl $(INCLS)
	$(CHEETAH) compile $(CHEETAH_FLAGS) $<

$(ODIR)/%.txt: %.txt
	cp $< $@

all: $(PYS) # $(TXTS)

.PHONY:  all  printsource

printsource:
	a2ps $(SOURCES)

